<template>
	<div id="mainpanel">
  <el-tabs v-model="activeTabName" @tab-click="handleTabChangeClick">
    <el-tab-pane label="历史活动" name="resultpanel">
<el-row :gutter="10">
	<el-col :span="16">
  <el-table
    :data="activityResultList"
    height="316"
    border
    style="width: 100%"
    max-height="316">
    <el-table-column
      prop="lstno"
      label="序号"
      width="60">
    </el-table-column>
    <el-table-column
      prop="title"
      label="活动项目">
    </el-table-column>
    <el-table-column
      prop="created_at"
      label="日期"
      width="100">
    </el-table-column>
    <el-table-column
      prop="status"
      label="状态"
      width="80">
    </el-table-column>
  </el-table>
	</el-col>
	<el-col :span="8">
		<div class="selectedActivityInfoPanel">
			<div class="selectedActivityInfoPanel_title">
				<el-row :gutter="10">
					<el-col :span="6">
						<span>成功沙龙</span>
					</el-col>
					<el-col :span="18">
						<span>当前活动：湖南省中小学教师论文2024年度评审活动</span>
					</el-col>
				</el-row>
			</div>
			<div class="selectedActivityInfoPanel_chooseClass">
				<el-row :gutter="10">
					<el-col :span="8">
						<div>
							<el-select v-model="chooseClassType" clearable placeholder="类别"  @change="changeChooseClassType">
								<el-option  
									v-for="item in chooseClassTypeList" 
									:key="item.value" 
									:label="item.label" 
									:value="item.value">
								</el-option>
							</el-select>
						</div>
					</el-col>
					<el-col :span="8">
						<div>
							<el-select v-model="chooseAwards" clearable placeholder="奖项">
								<el-option  
									v-for="item in chooseAwardsList" 
									:key="item.value" 
									:label="item.label" 
									:value="item.value">
								</el-option>
							</el-select>
						</div>
					</el-col>
					<el-col :span="8">
						<div>
							<el-select v-model="chooseAuthor" clearable placeholder="作者">
								<el-option  
									v-for="item in chooseAuthorList" 
									:key="item.value" 
									:label="item.label" 
									:value="item.value">
								</el-option>
							</el-select>
						</div>
					</el-col>
				</el-row>
			</div>
			<div class="selectedActivityInfoPanel_chooseResultList">
  <el-table
    :data="chooseSelectResultList"
    height="250"
    border
    style="width: 100%"
    max-height="250">
    <el-table-column
      prop="classtype"
      label="类别"
      width="80">
    </el-table-column>
    <el-table-column
      prop="title"
      label="标题">
    </el-table-column>
    <el-table-column
      prop="awards"
      label="奖项"
      width="80">
    </el-table-column>
    <el-table-column
      prop="author"
      label="作者"
      width="80">
    </el-table-column>
  </el-table>
			</div>
		</div>
	</el-col>
</el-row>
    </el-tab-pane>
  </el-tabs>
	</div>
</template>

<script>
	
	import poster from '@/js/post'
  export default{

    data() {
      return {
      	chooseClassTypeList:[
      	{label:"语文",value:"语文"},
      	{label:"数学",value:"数学"},
      	{label:"体育",value:"体育"},
      	],
      	chooseAwardsList:[
      	{label:"一等奖",value:"一等奖"},
      	{label:"二等奖",value:" 二等奖"},
      	{label:"三等奖",value:"三等奖"},
      	],
      	chooseAuthorList:[
      	{label:"刘德华",value:"刘德华"},
      	{label:"张学友",value:"张学友"},
      	{label:"郭富城",value:"郭富城"},
      	{label:"黎明",value:"黎明"},
      	],
      	chooseClassType:null,
      	chooseAwards:null,
      	chooseAuthor:null,
      	activeTabName:"resultpanel",
      	chooseSelectResultList:[
          {
           classtype: '语文类',
           title: '湖南省教育学会2024年度中小学教师论文评审活动1',
           awards: '一等奖',
           author: '郭富城',
          },
          {
           classtype: '数学类',
           title: '湖南省教育学会2024年度中小学教师论文评审活动1',
           awards: '二等奖',
           author: '刘德华',
          },
          {
           classtype: '体育类',
           title: '湖南省教育学会2024年度中小学教师论文评审活动1',
           awards: '三等奖',
           author: '黎明',
          },
          {
           classtype: '体育类',
           title: '湖南省教育学会2024年度中小学教师论文评审活动1',
           awards: '二等奖',
           author: '张学友',
          },
      	],
        activityResultList: [
          {
           lstno: '1',
           title: '湖南省教育学会2024年度中小学教师论文评审活动1',
           created_at: '2024-08-07',
           status: '已结束',
          },
          {
           lstno: '2',
           title: '湖南省教育学会2024年度中小学教师论文评审活动2',
           created_at: '2024-08-09',
           status: '进行中',
          },
          {
           lstno: '3',
           title: '湖南省教育学会2024年度中小学教师论文评审活动3',
           created_at: '2024-08-10',
           status: '进行中',
          },
        ]
      }
    },
    mounted(){
    	//this.getActivityList();
    },
	methods:{
		getActivityList(){
      	 poster.post("http://yunluo.com:8089/activity/list",{}).then(res=>{
      		console.log("res=",res)
      	 }).catch(err=>{
      		console.log("err=",err)
      	 })
		},
    	handleTabChangeClick(elem){
    		console.log(elem)
    		return true;
    	},
    	changeChooseClassType(selected){
    		console.log(selected)
    	}
	}
  }
</script>

<style>
	
	.selectedActivityInfoPanel{
		
	}
	.selectedActivityInfoPanel_title{
		font-size:10px;
		margin-bottom:10px;
		text-align: left;
	}
	.webtitle{
		font-size:20pt;
		font-weight: bold;
	}
</style>